package com.example.server.controller;


import com.example.server.mapper.MyuserMapper;
import com.example.server.pojo.Myuser;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tianxiang
 * @since 2022-01-30
 */
@RestController
@RequestMapping("/myuser")
public class MyuserController {

    @Autowired
    private MyuserMapper myuserMapper;

    @ApiOperation(value = "查询测试信息")
    @GetMapping("/test")
    public String testMyuser(){
        return "qa";
    }

    @ApiOperation(value = "查询用户信息")
    @GetMapping("/all")
    public List<Myuser> getallMyuser(){
        return myuserMapper.findUser();
    }
}
